package com.and9.mchen.mcmusic.manager;

import com.and9.mchen.mcmusic.dao.IAlbumDao;
import com.and9.mchen.mcmusic.dao.IImageUrlDao;
import com.and9.mchen.mcmusic.dao.IIntroductionDao;
import com.and9.mchen.mcmusic.dao.ILyricDao;
import com.and9.mchen.mcmusic.dao.IMusicStyleDao;
import com.and9.mchen.mcmusic.dao.ISingerDao;
import com.and9.mchen.mcmusic.dao.ISongDao;
import com.and9.mchen.mcmusic.dao.IStatisticsDao;
import com.and9.mchen.mcmusic.dao.factory.AlbumDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.ImageUrlDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.IntroductionDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.LyricDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.MusicStyleDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.SingerDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.SongDaoFactory;
import com.and9.mchen.mcmusic.dao.factory.StatisticsDaoFactory;

public final class DaoManager {

	private static DaoManager daoManager=new DaoManager();
	
	private IAlbumDao albumDao;
	private IImageUrlDao iImageUrlDao;
	private IMusicStyleDao musicStyleDao;
	private ISingerDao singerDao;
	private ISongDao songDao;
	private IStatisticsDao statisticsDao;
	private ILyricDao lyricDao;
	private IIntroductionDao introductionDao;
	
	private DaoManager(){
		albumDao=AlbumDaoFactory.getInstance().getAlbumDao();
		songDao=SongDaoFactory.getInstance().getSongDao();
		iImageUrlDao=ImageUrlDaoFactory.getInstance().getImageUrlDao();
		musicStyleDao=MusicStyleDaoFactory.getInstance().getMusicStyleDao();
		singerDao=SingerDaoFactory.getInstance().getSingerDao();
		statisticsDao=StatisticsDaoFactory.getInstance().getStatisticsDao();
		lyricDao=LyricDaoFactory.getInstance().getLyricDao();
		introductionDao=IntroductionDaoFactory.getInstance().getIntroductionDao();
	}

	public static IAlbumDao getAlbumDao() {
		return daoManager.albumDao;
	}

	public static IImageUrlDao getiImageUrlDao() {
		return daoManager.iImageUrlDao;
	}

	public static IMusicStyleDao getMusicStyleDao() {
		return daoManager.musicStyleDao;
	}

	public static ISingerDao getSingerDao() {
		return daoManager.singerDao;
	}

	public static ISongDao getSongDao() {
		return daoManager.songDao;
	}

	public static IStatisticsDao getStatisticsDao() {
		return daoManager.statisticsDao;
	}
	
	public static ILyricDao getLyricDao(){
		return daoManager.lyricDao;
	}
	
	public static IIntroductionDao getIntroductionDao() {
		return daoManager.introductionDao;
	}
}
